package com.zero.zeroframe.v

import android.content.Context
import android.view.View
import androidx.viewbinding.ViewBinding
import razerdp.basepopup.BasePopupWindow

/**
 * Popup基类
 * @author Zero
 * @since 2/4/24
 */
abstract class BasePopup<VB : ViewBinding>(context: Context, layoutId:Int):BasePopupWindow(context){
    protected lateinit var mBinding: VB

    init {
        setContentView(layoutId)
    }

    override fun onViewCreated(contentView: View) {
        bindView(contentView)
        mBinding.initView()
    }

    abstract fun bindView(contentView: View)
    abstract fun VB.initView()

    open fun show() {
        super.showPopupWindow()
    }
}